// Package MyPackage easy_set
// @Title MyPackage
// @Description
// @Author  == 琳琳也叫王木木 ==  2022-02-16 20:40
// @Create  2022-02-16 20:40
package MyPackage

import "sync"

type inter interface {
}

type Set struct {
	m map[inter]bool
	sync.RWMutex
}

func New() *Set {
	return &Set{
		m: map[inter]bool{},
	}
}

func (s *Set) Add(item inter) {
	s.Lock()
	defer s.Unlock()
	s.m[item] = true
}
